﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace Gammar.Price.ObjectModel
{
    public class DataBlock<T> where T : class
    {
        public DataBlock(Collection<T> items, int count, int pageIndex)
        {
            DataCount = count;
            PageIndex = pageIndex;
            Items = items;
        }
        /// <summary>
        /// 获得 数据总数
        /// </summary>
        public int DataCount { get; private set; }
        /// <summary>
        /// 获得 当前页码，最小页码为零
        /// </summary>
        public int PageIndex { get; private set; }
        /// <summary>
        /// 获得 当前数据集合
        /// </summary>
        public Collection<T> Items { get; private set; }
    }
}
